namespace :bilibiliranking do
  desc "bilibili ranking example history"
  task :history => :environment do
    doc = BiliRankingMaker.create({:path => "#{BILI_PRO_PATH}#{ENV['pa']}\\"}) do |vvm|
      vvm.play_bgm('1.mp3') do
        vvm.pics('weekly', [1], :length => 6)
        vvm.pics "history", [1], :length => 6
      end
      vvm.history
    end
    doc.write File.open("#{BILI_PRO_PATH}#{ENV['pa']}\\" + "xml.xml", 'w')
  end
end